<%-- 
    Document   : index
    Created on : 18-nov-2013, 11.35.34
    Author     : Ilo
--%>

<%@page import="java.util.LinkedList"%>
<%@page import="it.evento.Events"%>
<%@page import="it.evento.EventPrintable"%>
<%@page import="java.util.List"%>
<%@page import="it.evento.utils.genpage.Article"%>
<%@page import="it.evento.utils.genpage.ArticleRow"%>
<%@page import="it.evento.utils.genpage.RowCell"%>
<%@page import="it.evento.Users"%>
<%@page import="it.evento.utils.genpage.BlogPost"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%> 
<%
    boolean isLoggedUser = false;
    Users loggedUser = null;

    if (session.getAttribute("loggedUser") != null) {
        loggedUser = (Users) session.getAttribute("loggedUser");
        isLoggedUser = true;
    } else {
        isLoggedUser = false;
    }
%> 

<!DOCTYPE html>
<html dir="ltr" lang="it-IT">
    <head>
        <title>EvenTO</title>

        <jsp:include page="html/metadata.jsp" flush="true" />

        
        <script src="js/jquery.datetimepicker.js"></script>
        <script>
             $(function() {
                $("#datepickerstart").datetimepicker();
                $("#datepickerend").datetimepicker();
            });
        </script>
    </head>
    <body>
        <div id="evento-main">
            <!-- header -->
            <jsp:include page="html/header.jsp" flush="true" />
            <!-- /header -->

            <!-- top-menu -->
            <%@include file="html/top-menu.jsp" %>
            <!-- /top-menu -->

            <div class="evento-sheet clearfix">
                <div class="evento-layout-wrapper">
                    <div class="evento-content-layout">
                        <div class="evento-content-layout-row">
                            <div class="evento-layout-cell evento-content">
                                <form action='OAuthController?authenticate' method='POST'> 
                                    <fieldset>
                                        <legend>Fase 1 - Google Authentication</legend>
                                        <input type='submit'  value='Authenticate' class="evento-button"/>
                                    </fieldset>
                                </form>      

                                <form action='CalendarController?type=createEvent' method='POST'> 
                                    <fieldset>
                                        <legend>Fase 2 - createEvent</legend>
                                        Nome Evento: <input type="text" name="evName" />
                                        <br/>
                                        Location Evento: <input type="text" name="evLocation" />
                                        <br/>
                                        Data di inzio: <input type="text" name="evStartDate" id="datepickerstart"/>
                                        <br/>
                                        Data di fine: <input type="text" name="evEndDate" id="datepickerend"/>
                                        <br/>
                                        <br/>
                                        <input type='submit'  value='createEvent' class="evento-button"/>
                                    </fieldset>
                                </form>

                                <!--        
                                 <form action='CalendarController?type=inizializeUserCalendar' method='POST'> 
                                    <fieldset>
                                        <legend>inizializeUserCalendar</legend>
                                        <input type='submit'  value='inizializeUserCalendar' class="evento-button"/>
                                    </fieldset>
                                </form>
                                -->

                                <br/>
                                <!-- Stampa il calendario EvenTo dell'utente corrente-->
                                <!--<iframe src='https://www.google.com/calendar/embed?src=<%= request.getParameter("Calendar")%>&ctz=Europe/Rome' style='border: 0' width='800' height='600' frameborder='0' scrolling='no'></iframe>-->
                                <center>
                                    <iframe src="https://www.google.com/calendar/embed?showPrint=0&amp;showTabs=0&amp;showCalendars=0&amp;showTz=0&amp;height=300&amp;wkst=1&amp;bgcolor=%23666666&amp;src=<%= request.getParameter("Calendar")%>&amp;color=%236B3304&amp;ctz=Europe%2FRome" style=" border:solid 1px #777 " width="700" height="300" frameborder="0" scrolling="no"></iframe>
                                </center>
                            </div>

                            <!-- sidebar -->
                            <jsp:include page="html/sidebar.jsp" />
                            <!-- /sidebar -->

                        </div>
                    </div>
                </div>

                <!-- footer -->
                <%@include file="html/footer.jsp" %>
                <!-- /footer -->

            </div>
        </div>
    </body>
</html>
